package com.yzcrm.erp.crm.common;

/**
 * @author hmb
 */

public enum FormTypeEnum{
    /**
     * 自定义字段类型
     */
    TEXT(1,"text"),
    TEXTAREA(2,"textarea"),
    SELECT(3,"select"),
    DATE(4,"date"),
    NUMBER(5,"number"),
    FLOATNUMBER(6,"floatnumber"),
    MOBILE(7,"mobile"),
    FILE(8,"file"),
    CHECKBOX(9,"checkbox"),
    USER(10,"user"),
    STRUCTURE(12,"structure"),
    DATETIME(13,"datetime"),
    EMAIL(14,"email"),
    CUSTOMER(15,"customer"),
    BUSINESS(16,"business"),
    CONTACTS(17,"contacts"),
    MAP_ADDRESS(18,"map_address"),
    CATEGORY(19,"category"),
    CONTRACT(20,"contract"),
    RECEIVABLES_PLAN(21,"receivables_plan"),
    BUSINESS_CAUSE(22,"business_cause"),
    EXAMINE_CAUSE(23,"examine_cause"),
    FIVE_STARS(24,"five_stars"),
    TYPE_PHONE(25,"type_phone"),
    PICTURE(26,"pictures"),
    STOREHOUSE(27,"storehouse"),
    SUPPLIER(28,"supplier"),
    CUSTOMER_ALL(29,"customer_all"),


    PSI_SALESLEAVE_SI(30,"psi_salesLeave_si"),          // 销售出库单号
    FINANCE_PURCHASE_SI(31,"finance_purchase_si"),      // 采购申请单号
    PSI_BORROWLEAVE_SI(32,"psi_borrowLeave_si"),        // 借用出库单号
    PSI_REPAIRLEAVE_SI(33,"psi_repairLeave_si"),        // 维修出库单号
    PSI_TESTLEAVE_SI(34,"psi_testLeave_si"),            // 内部测试出库单号
    PSI_OTHERLEAVE_SI(35,"psi_otherLeave_si"),          // 其它出库单号
    CUSTOMER_CONTACT_SI(36,"customer_contact_si"),      // 客户联系人
    CONTRACT_SI(37,"contract_si"),                      // 合同订单号

    UPLOAD_SINGLE(38,"uploadsingle"),                      // 上传文件（知识库）
    TIME(39,"time"),                                       // 时间输入框
    SHOW_TEXT(40,"showText"),                              // 文本显示用（文件大小）
//    KMS_RESOURCE_CATEGORY_SELECT(41,"kms_resource_category_select"),  // 资源分类  后改为使用category
    ROLE(42,"role"),                                       // 角色
    /**
     *  报价 type 750
     */
    QUOTATION(750,"quotation"),

    NULL(0,"null")
    ;

    FormTypeEnum(int type, String formType){
        this.type = type;
        this.formType = formType;
    }

    private int type;
    private String formType;

    public static FormTypeEnum parse(int type) {
        for (FormTypeEnum Enum : FormTypeEnum.values()) {
            if (Enum.getType()==type) {
                return Enum;
            }
        }
        return NULL;
    }

    public int getType(){
        return type;
    }

    public String getFormType(){
        return formType;
    }}
